﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;

namespace XRPlayer
{
    public class XRPlayerEvent
    {

    }
    public interface IMediaControl
    {
        bool OpenVideoFromFile(string path);

        void CloseVideo();

        void SetLooping(bool bLooping);
        bool IsLooping();

        bool HasMetaData();
        bool CanPlay();
        bool IsPlaying();
        bool IsSeeking();
        bool IsPaused();
        bool IsFinished();
        bool IsBuffering();
        void Play();
        void Pause();
        void Stop();
        void Rewind();
        //time milliseconds
        void Seek(float timeMs);
        void GetCurrentTimeMs();
        void MuteAudio(bool isMute);
        bool IsMuted();
        void SetVolume(float volume);
        void GetVolume();
    }
    public interface IMediaInformation
    {
            /// <summary>
            /// Returns media duration in milliseconds
            /// </summary>
            float GetDurationMs();

            /// <summary>
            /// Returns video width in pixels
            /// </summary>
            int GetVideoWidth();

            /// <summary>
            /// Returns video height in pixels
            /// </summary>
            int GetVideoHeight();

            /// <summary>
            /// Returns the current achieved playback rate in frames per second
            /// </summary>
            float GetVideoPlaybackRate();

            /// <summary>
            /// Returns true if the media has a visual track
            /// </summary>
            bool HasVideo();

            /// <summary>
            /// Returns true if the media has a audio track
            /// </summary>
            bool HasAudio();

            /*float GetVideoFrameRate();
            string GetMediaDescription();
            string GetVideoDescription();
            string GetAudioDescription();*/
    }
    public enum Platform
    {
        Windows,
        Android,
        IOS,
        ARKit,
        ARCore,
        Vuforia,
        VR,
    }
}
